<?php
/**
 * $Id: init.php 13 2010-07-06 04:36:06Z corlatti $
 * @author Claudio Corlatti
 *
 */
require '../library/bootstrap/prepend.php';

//uncomment next line to generate DTO and DAO classes from DB
Doctrine::generateModelsFromDb('../library/dao', array(DB_NAME), array('generateTableClasses' => false) );


/* pretty simple select 
$stmt = $conn->prepare('SELECT * FROM paises');
$stmt->execute();
$results = $stmt->fetchAll();
print_r($results);
*/



/*
$marital = new Estadocivil();
$marital['cDescripcion'] = 'Viudo';
$marital['idIdioma'] = 1;
$marital->save();
*/

//locale config
/*$directory = dirname(__FILE__).'/locale';
$domain = 'messages';
$locale ="en";

putenv("LANG=".$locale); //not needed for my tests, but people say it's useful for windows

setlocale( LC_ALL, $locale);
bindtextdomain($domain, $directory);
textdomain($domain);
bind_textdomain_codeset($domain, 'iso-8859-1');

try {
	$u = new UserManagment();
	//print_r($u->existsUserName('anita'));
	//echo $u->checkPasswordStrength('aniteamo3_');
	//$u->registerBasicUser('ccorlatti', 'ade3saq1', 'corlatti@gmail.com', 1);
	$u->changeStateUser(3, "S");
	
	//$geo = new Geo();
	//print_r($geo->getCountriesLike('ar', 1));	
	//print_r($geo->getRegionsByCountryLike('a', 5, 1));
	//print_r($geo->getCitiesByRegionsAndCountryLike('mar', 1818, 5, 1));
	//print_r($geo->getCity(569940, 1));
} catch(SiteGenericException $e){
	echo $e->getErrorMessage();
} catch(Exception $e){
	echo $e->getMessage();
	//echo 'failed to register';
	//print_r($e);
}
*/
?>